package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.HashMap;
import java.util.Map;

import com.taobao.api.FileItem;
import com.taobao.api.TaobaoUploadRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.TmallEaiOrderRefundRefuseResponse;
import com.taobao.api.ApiRuleException;
/**
 * TOP API: tmall.eai.order.refund.refuse request
 * 
 * @author auto create
 * @since 1.0, 2013-07-17 12:39:34
 */
public class TmallEaiOrderRefundRefuseRequest implements TaobaoUploadRequest<TmallEaiOrderRefundRefuseResponse> {

	private TaobaoHashMap udfParams; // add user-defined text parameters
	private Long timestamp;

	/** 
	* 退款单编号
	 */
	private Long refundId;

	/** 
	* 售中：onsale
售后：aftersale
	 */
	private String refundPhase;

	/** 
	* 退款版本号
	 */
	private Long refundVersion;

	/** 
	* 拒绝退款原因留言
	 */
	private String refuseMessage;

	/** 
	* 拒绝退款举证上传
	 */
	private FileItem refuseProof;

	public void setRefundId(Long refundId) {
		this.refundId = refundId;
	}
	public Long getRefundId() {
		return this.refundId;
	}

	public void setRefundPhase(String refundPhase) {
		this.refundPhase = refundPhase;
	}
	public String getRefundPhase() {
		return this.refundPhase;
	}

	public void setRefundVersion(Long refundVersion) {
		this.refundVersion = refundVersion;
	}
	public Long getRefundVersion() {
		return this.refundVersion;
	}

	public void setRefuseMessage(String refuseMessage) {
		this.refuseMessage = refuseMessage;
	}
	public String getRefuseMessage() {
		return this.refuseMessage;
	}

	public void setRefuseProof(FileItem refuseProof) {
		this.refuseProof = refuseProof;
	}
	public FileItem getRefuseProof() {
		return this.refuseProof;
	}
	private Map<String,String> headerMap=new TaobaoHashMap();
	
	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "tmall.eai.order.refund.refuse";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("refund_id", this.refundId);
		txtParams.put("refund_phase", this.refundPhase);
		txtParams.put("refund_version", this.refundVersion);
		txtParams.put("refuse_message", this.refuseMessage);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new TaobaoHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Map<String, FileItem> getFileParams() {
		Map<String, FileItem> params = new HashMap<String, FileItem>();
		params.put("refuse_proof", this.refuseProof);
		return params;
	}

	public Class<TmallEaiOrderRefundRefuseResponse> getResponseClass() {
		return TmallEaiOrderRefundRefuseResponse.class;
	}

	public void check() throws ApiRuleException {
		
		RequestCheckUtils.checkNotEmpty(refundId,"refundId");
		RequestCheckUtils.checkNotEmpty(refundPhase,"refundPhase");
		RequestCheckUtils.checkNotEmpty(refundVersion,"refundVersion");
		RequestCheckUtils.checkNotEmpty(refuseMessage,"refuseMessage");
		RequestCheckUtils.checkNotEmpty(refuseProof,"refuseProof");
	}
	
	public Map<String,String> getHeaderMap() {
		return headerMap;
	}
}
